angular.module('datepicker-util', [])

    .service 'datepickerBaseConfig', ()->
        (begin=new Date(), input=null) ->
            console.log(begin)
            begin = new Date(begin)
            end = new Date(begin)
            end.setYear(end.getFullYear() + 1)
            if !input
                input = new Date(begin)
            else
                input = new Date(input)
            {
                inputDate: input,
                titleLabel: '选择日期',
                setLabel: '确定',
                todayLabel: '今天',
                closeLabel: '关闭',
                mondayFirst: false,
                weeksList: ["日", "一", "二", "三", "四", "五", "六"],
                monthsList: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
                templateType: 'popup',
                from: begin,
                to: end,
                showTodayButton: true,
                dateFormat: 'yyyy-MM-dd',
                closeOnSelect: false,
                disableWeekdays: []
            }